package com.taru.houseapp.controller;

import com.taru.houseapp.commen.JsonResult;
import com.taru.houseapp.until.UUId;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@RestController
public class ImageServiceController {


    @RequestMapping(value = "image/download",method = RequestMethod.GET)
    public JsonResult imageDownload(){
        JsonResult result=null;
        try{
            result=new JsonResult(200,"获取成功","http://59.110.44.156/recourse/");
        }catch (Exception e){
            e.printStackTrace();
            result=new JsonResult(500,"服务器内部错误",e.getMessage());
        }
        return  result;
    }

    @RequestMapping(value = "/upload",method = RequestMethod.GET)
    public JsonResult imageUpload(){
        JsonResult result=null;
        try{
            result=new JsonResult(200,"获取成功","http://115.29.224.54:8080/image/upload");
        }catch (Exception e){
            e.printStackTrace();
            result=new JsonResult(500,"服务器内部错误",e.getMessage());
        }
        return  result;
    }

}
